package main

import "fmt"

type Studentt struct {
	Name  string
	score int
}

func NewStu(name string, score int) *Studentt {
	return &Studentt{
		Name:  name,
		score: score,
	}

}

func (s Studentt) GetScore() int {
	return s.score

}
func main() {

	stu := NewStu("FFF", 123)
	fmt.Println(stu)

	fmt.Println(stu.GetScore()) //通过自己建立的get方法来获取私有的score属性

}
